<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
      
      <div class="top">
              <div class="left"></div>
              <div class="right"></div>
              <div class="center">    <h1><?php echo $heading_title; ?></h1>  </div>
        </div>



<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="contact">
<div class="middle">


<div class="content">
<table width="100%">
          <tr>
            <td bgcolor="#999999" ><h1><b><?php echo $text_new; ?></b>
	    <?php  foreach ($ask as $ask_post) { }echo $ask_post['title']; ?></h1>
             </td>
          </tr>
          <tr >
            <td bgcolor="#E4E4E4">
	    <?php  echo htmlspecialchars_decode($ask_post['detail']); ?>
             </td>
          </tr>
          <tr>
            <td bgcolor="#CCFF99" align="right" >
	    <b><?php echo $text_author; ?></b> <?php  echo $ask_post['author']; ?> 
	    <b><?php echo $text_time; ?></b> <?php  echo  date('j M Y, g:i a', strtotime($ask_post['date'])); ?> 
             </td>
          </tr>
</table>
</div>

<div class="content">
<table>
          <tr>
            <td bgcolor="#999999" > <b><h1><?php echo $text_quess; ?></h1></b> </td>
          </tr>
	  <?php if (count($quess)!=0) { ?>
          <?php foreach ($quess as $quess_post) { ?>
 	  <tr>
            <td bgcolor="#E4E4E4"> <?php echo htmlspecialchars_decode($quess_post['reply_detail']); ?></td>
          </tr>
 	  <tr>
            <td bgcolor="#CCFF99" align="right" >
	    <?php if($admin !=null) { ?>
	     <a href="index.php?route=webboard/read_board&act=delete&&id=<?php=$ask_post['ask_id'];?>&quess_id=<?php=$quess_post['quess_id'];?>&page=<?php=$page?>"  onClick="return Conf(this)" >
		<img src="catalog/view/theme/default/image/b_drop.png" alt="delete"  border="0" />
	     </a>
	    <?php } ?>
	    <b><?php echo $text_reply?></b><?php=$quess_post['author']; ?><b><?php echo " ".$text_time; ?></b><?php  echo  " , ".date('j M Y, g:i a', strtotime($quess_post['date'])); ?> 
	    <?php if 	($admin !=null) { ?>
   		<a href="index.php?route=webboard/edit_quess&id=<?php=$ask_post['ask_id'];?>&quess_id=<?php=$quess_post['quess_id'];?>&page=<?php=$page?>">
		   <img src="catalog/view/theme/default/image/b_edit.png" alt="edit"  border="0" />
		 </a>
	    <?php } ?>
	    </td>
          </tr>
          <?php } //end foreach
	  } else {?>
	 <tr>
            <td bgcolor="#E4E4E4"> <?php echo $text_nobody; ?></td>
          </tr>
       <?php } ?>

           <tr>
            <td >
	    <div class="pagination"><?php echo $pagination; ?></div>
	    </td>
          </tr>

          <tr>
            <td ><br /><b><h1><?php echo $entry_enquiry; ?></h1></b><br />
              <textarea name="enquiry" style="width: 550px;" rows="10"><?php=$enquiry?></textarea>
              <?php if ($error_enquiry) { ?>
              <span class="error"><?php echo $error_enquiry; ?></span>
              <?php } ?>
	      </td>
          </tr>
          <tr>
            <td><?php echo $entry_captcha; ?><br />
              <input type="text" name="captcha" value="<?php echo $captcha; ?>" />
              <?php if ($error_captcha) { ?>
              <span class="error"><?php echo $error_captcha; ?></span>
              <?php } ?>
              <br />
              <img src="index.php?route=webboard/read_board/captcha" /></td>
          </tr>
</table>
</div>


<div class="content">
<table>
          <tr>
	<?php if($webboard_guest == "1" || $register_user != null || $admin !=null) { ?>
            <td align="right"><a onclick="$('#contact').submit();" class="button"><span><?php echo $text_send; ?></span></a></td>
	<?php } else { ?>
            <td align="right"><a onclick="location='<?php echo 'index.php?route=webboard/read_board&id='.$id; ?>'" class="button"><span><?php echo $text_send_alert; ?></span></a></td>
	<?php } ?>
          </tr>
</table>
</div>

</form>
</div>




  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>  </div>

<?php echo $footer; ?> 


<script type="text/javascript" src="admin/view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
<!--
CKEDITOR.replace('enquiry');
//-->
</script>
<script Language="Javascript">
<!--
function Conf(Object) {
	if (confirm("<?php=$alert?>") == true){
		return true;
	}
	    return false;
	}
//-->
</script>